<?php

namespace App\Http\Controllers\Api;

use App\Exceptions\ApiException;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class TestController extends Controller
{
    public function test()
    {
        return [
            "code" => 0,
            "msg" => "success",
            "data" => []
        ];
    }

    public function error()
    {
        throw new ApiException("这是自定义错误", 1001);
    }
}
